﻿@model UserAgreementModel
@using Nop.Web.Models.Customer;
@{
    Layout = "~/Views/Shared/_ColumnsOne.cshtml"; 
}
<script type="text/javascript">
    $(document).ready(function () {

        $("#agreement-agree").click(toggleContinueButton);

        toggleContinueButton();
    });

    function toggleContinueButton() {
        if ($('#agreement-agree').is(':checked')) {
            $('#continue-downloading').removeAttr('disabled');
        } else {
            $('#continue-downloading').attr('disabled', 'disabled');
        }
    }
</script>
<div class="page user-agreement-page">
    <div class="panel panel-default form-panel">
        
        <div class="panel-heading">
            <h3>@T("DownloadableProducts.UserAgreement")</h3>
        </div>
        <div class="panel-body">
            @Html.Raw(Model.UserAgreementText)
            <div>
                <input id="agreement-agree" type="checkbox" value="@T("DownloadableProducts.IAgree")" />
            </div>
            <div>
                <input type="submit" id="continue-downloading" class="button-1 user-agreement-button" value="@T("Common.Continue")" onclick="setLocation('@Url.RouteUrl("GetDownload", new { orderItemId = Model.OrderItemGuid, agree = true })')" />
            </div>
        </div>
    </div>
</div>
